package com.lxf.project.util;

public class CompletableFutureDemo {
    public static void main(String[] argv) throws InterruptedException {
//
//        ThreadMXBean threadMXBean = ManagementFactory.getThreadMXBean();
//        long[] deadlockedThreads = threadMXBean.findDeadlockedThreads();
//        if (deadlockedThreads != null && deadlockedThreads.length > 0) {
//            for (int i = 0; i < deadlockedThreads.length; i++) {
//                ThreadInfo threadInfo = threadMXBean.getThreadInfo(deadlockedThreads[i]);
//                System.out.println("线程id为"+threadInfo.getThreadId()+",线程名为" + threadInfo.getThreadName()+"的线程已经发生死锁，需要的锁正被线程"+threadInfo.getLockOwnerName()+"持有。");
//            }
//        }
    }




}
